From 353cb77788560d9516fe0d0dd14efec6d92f25f3 Mon Sep 17 00:00:00 2001 From: "mjw@wray-m-3.hpl.hp.com" Date: Fri, 3 Sep 2004 16:43:14 +0000 Subject: [PATCH] bitkeeper revision 1.1159.70.3 (41389f22BlnxYbup7d6jcZXvICR6qg) Fix problem with domain shutdown events. --- tools/python/xen/xend/XendDomain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 2111a166bd..afe2a4601b 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -243,12 +243,12 @@ class XendDomain: if d['shutdown']: reason = XendDomainInfo.shutdown_reason(d['shutdown_reason']) log.debug('XendDomain>reap> shutdown id=%s reason=%s', id, reason) + dominfo = self.domain_by_id.get(id) + name = (dominfo and dominfo.name) or '??' if reason in ['suspend']: - dominfo = self.domain_by_id.get(id) if dominfo.is_terminated(): log.debug('XendDomain>reap> Suspended domain died id=%s', id) else: - name = (dominfo and dominfo.name) or '??' eserver.inject('xend.domain.suspended', [name, id]) continue if reason in ['poweroff', 'reboot']: -- 2.30.2